Integrand size = 22, antiderivative size = 135 \[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\frac {d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac {(b (2 c f-d e (1-n))-a d f (1+n)) (a+b x)^{-n} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (e+f x)^{1+n} \operatorname {Hypergeometric2F1}\left (n,1+n,2+n,\frac {b (e+f x)}{b e-a f}\right )}{2 b f^2 (1+n)} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {81, 72, 71} \[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\frac {(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (-a d f (n+1)+2 b c f-b d e (1-n)) \operatorname {Hypergeometric2F1}\left (n,n+1,n+2,\frac {b (e+f x)}{b e-a f}\right )}{2 b f^2 (n+1)}+\frac {d (a+b x)^{1-n} (e+f x)^{n+1}}{2 b f} \]
[In]
[Out]
Rule 71
Rule 72
Rule 81
Rubi steps \begin{align*} \text {integral}& = \frac {d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac {(2 b c f-d (b e (1-n)+a f (1+n))) \int (a+b x)^{-n} (e+f x)^n \, dx}{2 b f} \\ & = \frac {d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac {\left ((2 b c f-d (b e (1-n)+a f (1+n))) (a+b x)^{-n} \left (\frac {f (a+b x)}{-b e+a f}\right )^n\right ) \int (e+f x)^n \left (-\frac {a f}{b e-a f}-\frac {b f x}{b e-a f}\right )^{-n} \, dx}{2 b f} \\ & = \frac {d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac {(2 b c f-b d e (1-n)-a d f (1+n)) (a+b x)^{-n} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (e+f x)^{1+n} \, _2F_1\left (n,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{2 b f^2 (1+n)} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.80 \[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\frac {(a+b x)^{-n} (e+f x)^{1+n} \left (d f (a+b x)+\frac {(2 b c f+b d e (-1+n)-a d f (1+n)) \left (\frac {f (a+b x)}{-b e+a f}\right )^n \operatorname {Hypergeometric2F1}\left (n,1+n,2+n,\frac {b (e+f x)}{b e-a f}\right )}{1+n}\right )}{2 b f^2} \]
[In]
[Out]
\[\int \left (d x +c \right ) \left (f x +e \right )^{n} \left (b x +a \right )^{-n}d x\]
[In]
[Out]
\[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\int { \frac {{\left (d x + c\right )} {\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\text {Exception raised: HeuristicGCDFailed} \]
[In]
[Out]
\[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\int { \frac {{\left (d x + c\right )} {\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}} \,d x } \]
[In]
[Out]
\[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\int { \frac {{\left (d x + c\right )} {\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}} \,d x } \]
[In]
[Out]
Timed out. \[ \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx=\int \frac {{\left (e+f\,x\right )}^n\,\left (c+d\,x\right )}{{\left (a+b\,x\right )}^n} \,d x \]
[In]
[Out]